package com.xkcoding.helloworld.strategy;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class DiscountDefaultServiceImpl implements DiscountService {

    @Override
    public String getDiscountResult(BigDecimal price) {
        return "默认优惠"+new BigDecimal("0.98").multiply(price).toString();
    }


}
